﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using Antu.WebControls;
using Antu.Core.Components;
using Antu.Core.Services;
using System.Web.UI.WebControls;
using EluZSProvider;
using System.Web;

namespace WebSys.UI.Control.ZhengShou
{
    public class DefaultControl : MPBasicTemplate
    {
        protected override void OnLoad(EventArgs e)
        {
            MPHeader.RegistAjaxScripts(typeof(DefaultControl));
            base.OnLoad(e);

            Label lable1 = (Label)FindControl("Label1");
            Button Button1 = (Button)FindControl("Button1");
            
            Button1.Click += new EventHandler(Button1_Click);
            lable1.Text = "aaa";


            //    EluBZDataProvider aaa = (EluBZDataProvider)ProviderService.ProviderServiceMange.GetProvider("EluBZProvider");

            //调用数据库说明            
            //if (aaa.GetAllUserList().Count > 0)
            //{
            //    Context.Response.Write(aaa.GetAllUserList()[0].Username);
            //}
            //aaa = (EluDataProvider)ProviderService.ProviderServiceMange.GetProvider("EluProvider");
            //lable1.Text = aaa.GetAllEffectiveUserList()[0].Username;
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            MPCalendar MPCalendar1 = (MPCalendar)FindControl("MPCalendar1");

            Context.Response.Write(MPCalendar1.Text);
        }
        protected override void AttachChildControls()
        {
        }

        [Antu.Core.Ajax.AjaxMethod()]
        public static string Test(string str)
        {
            return "hello111:" + str;
        }
        [Antu.Core.Ajax.AjaxMethod()]
        public static string Test22(string str)
        {
            return "hello222:" + str;
        }
    }
}


